Create fourslash syntax, compiler testcase, and build instructions summary#61900
Merged
RyanCavanaugh merged 4 commits intomainfrom Jun 18, 2025
Merged
Create fourslash syntax, compiler testcase, and build instructions summary#61900RyanCavanaugh merged 4 commits intomainfrom
RyanCavanaugh merged 4 commits intomainfrom
Conversation
Co-authored-by: RyanCavanaugh <6685088+RyanCavanaugh@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Create fourslash syntax, compiler testcase, and build instructions summary
Create fourslash syntax, compiler testcase, and build instructions summary
Jun 18, 2025
RyanCavanaugh
requested changes
Jun 18, 2025
Member
RyanCavanaugh
left a comment
There was a problem hiding this comment.
This is good. Also integrate the following content to the document:
- Run
hereby lintandhereby formatbefore you're doneAdd commentMore actions - Only add testcases in
tests/cases/compilerortests/cases/fourslash. Do not write direct unit tests. - Running a set of tests may take up to 4 minutes
- A full test run may take up to 15 minutes
- Maintainer comments in the issue should generally take priority over OP's comments
- Maintainers might give you hints on where to start. They are not always right, but a good place to start
Your workflow should be:
- Make a testcase that demonstrates the behavior. Run it (by itself) and review the baselines it generates to ensure it demonstrates the bug. Add the test and its baselines in one commit
- Fix the bug by changing code as appropriate. Put this fix in another commit
- Run the test you wrote again and ensure the baselines change in a way that demonstrates that the bug is fixed. Put this baseline diff in its own commit
- Run all other tests to ensure you didn't break anything. Some collateral baseline changes are normal, put these diffs in another commit
Co-authored-by: RyanCavanaugh <6685088+RyanCavanaugh@users.noreply.github.com>
Contributor
Author
Added all requested content including workflow guidelines, performance expectations, test location requirements, and the hereby format command. Changes committed in 870ec54. |
RyanCavanaugh
approved these changes
Jun 18, 2025
jakebailey
approved these changes
Jun 18, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR creates a comprehensive guide for writing TypeScript tests to help Copilot understand how to write fourslash tests and compiler tests.
What's included
Created
.github/copilot-instructions.mdcontaining:Build Instructions Summary
hereby local,hereby tests,hereby runtests, etc.)Fourslash Test Syntax Guide
/// <reference path='fourslash.ts'/>/////**/and/*name*/syntax for positioning// @Filename:[|text|]Compiler Test Syntax Guide
.tsfile structure intests/cases/compiler/// @directive: valueExamples
Fourslash test example:
Compiler test example:
Focus on simplicity
The guide prioritizes:
The documentation has been tested against the actual codebase to ensure accuracy.
Fixes #61899.
💬 Share your feedback on Copilot coding agent for the chance to win a $200 gift card! Click here to start the survey.